//角色信息接口
import axios from "../utils/axios";

//查看所有角色信息
export function lookAllRoles() {
    return axios.get("/role");
}

//根据角色名查找角色
export function lookRolesByName(roleName) {
    return axios.get(`/role/${roleName}`);
}

//新增一条角色信息
export function insertOneRole(role) {
    return axios.post("/role", role);
}

//修改一条角色信息
export function updateOneRole(role) {
    return axios.put("/role", role);
}

//删除角色信息
export function deleteRole(ids) {
    return axios({
        url: "/role",
        method: "DELETE",
        data: ids,
    });
}
